package com.zjuee.web.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zjuee.base.model.common.auth.Org;
import com.zjuee.service.auth.vo.OrgVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * @author wu liang
 * @since 1.0
 */
@Mapper
public interface OrgMapper extends BaseMapper<Org> {

    /**
     * 根据levelCode格式  获取最大值
     *
     * @param levelCodeFormat String
     * @return String
     */
    @Select("select max(level_code) from sys_organization where level_code like #{levelCodeFormat}")
    String getMaxLevelCode(String levelCodeFormat);

    List<OrgVo> findGovOrg();

}
